<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<!-- RichFaces tag library declaration -->
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="../../css/cssMain.css" />
<script type="text/javascript" src="../js/mainJS.js"></script>
<title>Преглед на задание</title>
</head>
<body>
<f:view>
	<h:form>
		<rich:panel style="width:60%; margin-left:auto; margin-right:auto;"
			header="Форма за преглед избрано задание">
			<h:panelGrid style="width:90%; margin-left:auto; margin-right:auto;">
				<h:outputText value="Заглавие на заданието" />
				<h:inputTextarea style="width:100%;"
					value="#{mbStudent.selectedTaskAll.title}" readonly="true" />
				<h:panelGroup>
					<h:outputText value="Последен срок до: " />
					<rich:calendar value="#{mbStudent.selectedTaskAll.endDate}"
						datePattern="#{mbStudent.datePattern}" readonly="true" />
				</h:panelGroup>
				<h:outputText value="Съдържание" />
				<rich:editor theme="simple" validator="#{mbStudent.validator}"
					viewMode="#{mbStudent.viewMode}" width="750" height="400"
					value="#{mbStudent.selectedTaskAll.text}" readonly="true">
					<f:param name="simple_advanced_buttons1"
						value="bold,italic,underline, cut,copy,paste,pasteword" />
					<f:param name="simple_advanced_toolbar_location" value="top" />
					<f:param name="simple_advanced_toolbar_align" value="left" />
				</rich:editor>
				<h:panelGroup>
					<h:outputText value="Прикачени файлове" />
					<rich:spacer width="10" />
					<h:commandLink value="#{mbStudent.selectedTaskAll.fileName}"
						rendered="#{not empty mbStudent.selectedTaskAll.fileName}"
						action="#{mbStudent.downloadTask}" />
					<rich:spacer width="10" />
					<h:outputText
						rendered="#{mbStudent.selectedTaskAll.fileName == null}"
						value="няма прикачени файлове" styleClass="outputTextValue" />
				</h:panelGroup>
				<h:outputText value="Забележка" />
				<h:inputTextarea rows="2" style="width:100%;" readonly="true"
					value="#{mbStudent.selectedTaskAll.description}" />
			</h:panelGrid>
			<rich:spacer height="15" />
			<h:panelGroup>
				<a4j:commandButton value="Към главния екран"
					action="#{mbStudent.navToStudentMain}" />
			</h:panelGroup>
		</rich:panel>
	</h:form>
</f:view>
</body>
</html>